<script type="text/javascript">
	document.write('<script src="js_5.js"><\/script>');
	console.log("breDoctype")
</script>
<!DOCTYPE html>

<html>
<head>
	<title>class_test</title>
	<meta charset="utf-8">
</head>
<script type="text/javascript">document.write("afterHead")</script>
<body>
	<div>Original Div</div>
	<script type="text/javascript" defer >
		//加defer的时候，加载不会再影响渲染，但是执行时会
		document.write('<script src="js_5.js"><\/script>');
		document.write("after_origin_js")
		console.log("after_origin_js")
	</script>
	<div>After Origin Div</div>
</body>
</html>
<script type="text/javascript">
	document.write('<script src="js_5.js"><\/script>');
	document.write("after_origin")
</script>
<script type="text/javascript">
	//js异步加载
	//如下：正常情况下有defer标记的js会后加载
	//xie写入一个事件队列
	setTimeout(()=>{
		console.log("报错后是否执行？")//是
	})
	// 假如说写一个错误？
	console.log(a+9);//此处以下不起作用，但是其他的JS文件照样加载
	let b=9;
	console.log(9);
  window.alert(b);
  setTimeout(()=>{
		console.log("报错后的事件是否执行？")//否
	})

</script>
<script type="text/javascript" src="js_2.js" defer></script>
<script type="text/javascript" src="js_3.js" defer></script>
<script type="text/javascript" src="js_4.js" defer></script>

<script type="text/javascript" src="index.js"></script>
<script type="text/javascript" src="js_0.js"></script>
<script type="text/javascript" src="js_1.js"></script>
<script type="text/javascript" async>
	console.log("After_all_js")
	document.write("- -!")
	// setTimeout(()=>{
	// 	document.write("--")//刷白页面
	// })

	//事件队列同样有顺序
	setTimeout(()=>{
		for(let i=0;i<10000;i++){
			i==9999&&console.log("handle_end")
		}
		console.log("has_some_handle")
	}
	,1000 //但是延时会让后面的先执行
	)
	setTimeout(()=>{
		console.log("no_other_handle")
	})
</script>
<script type="text/javascript" async>
	console.log("0_0")
</script>



